import { createHash } from 'crypto';

/**
 * hash 加密
 * @param {string} text
 * @returns {string}
 */
export function getHash(text) {
    const hashFunc = createHash('sha256');
    hashFunc.update(text);
    return hashFunc.digest('base64');
}
